.index {
    margin-bottom: 4rem;
    margin-block-end: 4rem;
}

.index__item {
    margin: 0;

    a {
        display: block;
        color: inherit;
        text-decoration: none;
        padding: .625rem .875rem;
        font-size: var(--step-0);
        border-radius: var(--border-radius);

        &:hover {
            color: var(--link-color);
        }
    }

    a[aria-current="page"] {
        color: var(--link-color);
        background-color: var(--lightest-background-color);
        font-weight: 500;
    }
}

.index__toggle {
    cursor: pointer;
    display: flex;
    width: 100%;
    padding: .75rem 1.125rem;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--secondary-button-background-color);
    color: var(--secondary-button-text-color);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1);

    &:hover {
        background-color: var(--secondary-button-hover-color);
    }

    @media all and (min-width: 1024px) {
        display: none;
    }

    svg {
        width: 1.5em;
        height: 1.5em;
        color: inherit;
        fill: none;
        stroke-width: 4;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    #ham-top,
    #ham-middle,
    #ham-bottom {
        transition: all .2s linear;
    }

    #ham-top {
        transform-origin: 30px 37px;
    }

    #ham-bottom {
        transform-origin: 30px 63px;
    }

    &[aria-expanded="true"] {
        #ham-middle {
            opacity: 0;
        }

        #ham-top {
            transform: rotate(41deg);
        }

        #ham-bottom {
            transform: rotate(-41deg);
        }
    }
}

.index__list {
    display: block;

    &[data-open="false"] {
        display: none;

        @media all and (min-width: 1024px) {
            display: block;
        }
    }

    &[data-open="true"] {
        display: block;

        @media all and (min-width: 1024px) {
            display: block;
        }
    }
}
